.container {
  height: 36px;
  width: 200px;
  min-width: 80px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;

  :global {
    .euiFormControlLayout {
      .euiSuperSelectControl {
        align-items: center;
        height: 36px !important;
        background-color: var(--euiColorEmptyShade) !important;
        box-shadow: none !important;
        border: 1px solid var(--controlsBorderColor) !important;
        border-left: 0 !important;
        border-right: 0 !important;
        padding: 0 55px 0 10px !important;

        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        &.euiSuperSelect--isOpen__button {
          background-color: var(--euiColorEmptyShade) !important;
        }

        &:focus {
          background-color: var(--euiColorEmptyShade) !important;
        }
      }
    }
    .euiPopover:not(.euiSuperSelect) {
      position: absolute;
      z-index: 10;
      top: 10px;

      svg {
        width: 18px !important;
        height: 18px !important;
      }
    }
    .euiPopover.euiPopover-isOpen {
      .euiIcon {
        color: var(--euiTextSubduedColorHover);
      }
    }
    .euiFormControlLayoutIcons {
      z-index: 6;
      right: 36px;

      .euiLoadingSpinner {
        margin-right: -22px;
      }

      .euiIcon {
        width: 16px;
        height: 12px;
      }
    }
  }
}

@include global.insights-open {
  .container {
    width: 154px !important;
    :global(.euiFormControlLayout__childrenWrapper) {
      width: 154px !important;
    }
  }
}

.searchMode {
  position: relative;
  line-height: 14px !important;
  height: auto;
  padding: 8px 4px !important;
  background-color: var(--euiColorEmptyShade);
  word-break: break-word;

  &:hover,
  &:focus {
    background-color: var(--hoverInListColorDarken) !important;
  }

  :global {
    .euiContextMenu__icon {
      margin-left: 8px;
      margin-right: 2px;
      width: 16px;
      height: 14px;
    }
  }
}

.controlsIcon {
  cursor: pointer;
  margin-left: 6px;
  height: 16px !important;
  width: 16px !important;
  &:global(.euiIcon) {
    color: var(--inputTextColor) !important;
  }
}

.createIndexBtn {
  display: flex;
  align-items: center;
  justify-content: center;

  margin-left: -28px;
  border-bottom: 1px solid var(--separatorColor);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;

  text-decoration: underline;
  cursor: pointer;
}

.placeholder {
  position: absolute !important;
  font-size: 14px !important;
  z-index: 5;
  width: 100%;
  height: 36px !important;
  top: 0;
  left: 0;
  transform: none !important;

  :global {
    .euiButtonContent.euiButtonEmpty__content {
      padding-left: 16px !important;
      padding-right: 30px;
      justify-content: left;

      .euiButtonEmpty__text {
        padding-right: 10px;
        text-overflow: initial !important;
        color: var(--inputPlaceholderColor) !important;
      }
    }
  }

  &:hover,
  &:active,
  &:focus {
    transform: none !important;
    background-color: transparent !important;
  }
}

.refresh {
  display: flex;
  align-items: center;
  justify-content: center;

  position: absolute;
  top: 50%;
  right: 1px;
  transform: translateY(-50%);
  z-index: 6;

  .refreshBtn {
    width: 30px;

    &:hover {
      transform: translateY(0) !important;
    }
  }
}

.select {
  width: 350px;
  position: absolute;
  z-index: 1;

  :global {
    .euiFormControlLayout__childrenWrapper {
      width: 200px;
      position: relative;
    }
  }
}
